package cn.sytton.taffe.excel.util;

import java.util.Map;

/**
 * ExportExcel导出线程记录参数
 *
 * @author skyrock
 */
public class ExportThread {

    private static final ThreadLocal<Map<String, Object>> CONTEXT_THREAD_LOG = new ThreadLocal<>();

    public static void setData(Map<String, Object> data) {
        CONTEXT_THREAD_LOG.set(data);
    }

    public static Map<String, Object> getData() {
        Map<String, Object> data = CONTEXT_THREAD_LOG.get();
        CONTEXT_THREAD_LOG.remove();
        return data;
    }

}
